package com.go.where.family.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.family.dao.FamilySubjectDao;
import com.go.where.family.pojo.FamilySubjectInfo;
import com.go.where.family.service.FamilySubjectService;

@Service("familySubjectService")
public class FamilySubjectServiceImpl implements FamilySubjectService {

	@Resource(name = "familySubjectDao")
	private FamilySubjectDao familySubjectDao;

	@Override
	public List<FamilySubjectInfo> queryList(Map<String, Object> map) {
		return familySubjectDao.queryT(map);
	}

	@Override
	public FamilySubjectInfo querySubjectDetail(String subjectId) {
		FamilySubjectInfo sub = new FamilySubjectInfo();
		sub.setSubjectId(subjectId);
		return familySubjectDao.queryByPrimaryKey(sub);
	}

	@Override
	public int update(FamilySubjectInfo subInfo) {
		subInfo.setUpdateTime(new Date());
		return familySubjectDao.update(subInfo);
	}

}
